package net.steamcrafted.materialiconlib;

import net.steamcrafted.materialiconlib.factory.PixelMapFactory;
import ohos.app.Context;
import ohos.media.image.PixelMap;

public class MaterialDrawableBuilder {

    private final Context context;
    private int resId;
    private int iconColor;
    private int width, height;

    private MaterialDrawableBuilder(Context context) {
        this.context = context;
    }

    public static MaterialDrawableBuilder with(Context context){
        return new MaterialDrawableBuilder(context);
    }

    public MaterialDrawableBuilder setResId(int resId) {
        this.resId = resId;
        return this;
    }

    public MaterialDrawableBuilder setIconColor(int iconColor) {
        this.iconColor = iconColor;
        return this;
    }

    public MaterialDrawableBuilder setWidth(int width) {
        this.width = width;
        return this;
    }

    public MaterialDrawableBuilder setHeight(int height) {
        this.height = height;
        return this;
    }

    public PixelMap build(){
        return PixelMapFactory.CreatePixelMap(context, resId, iconColor, width, height);
    }
}
